import type { BrowserWindowConstructorOptions, WebPreferences } from "electron";
import { join } from "path";

export const baseBrowserWindowCfg:BrowserWindowConstructorOptions = {
    //宽度
    width: 800,
    //高度
    height: 600,
    //取消头部menu
    autoHideMenuBar: true,
    //允许手动最小化
    minimizable: true,
    //允许手动最大化
    maximizable: true,
}

export const baseWebPreferences:WebPreferences =  {
    
    //preload
     preload: join(__dirname, '../preload/index.js'),
     //允许preload
     contextIsolation: true,
     //沙盘
     nodeIntegration: false,
     //控制台--默认关闭
     devTools: false,
     //同源策略--默认取消
     webSecurity: false
}